package com.x.provider.api.general.service;

import com.x.core.web.api.R;
import com.x.provider.api.general.constants.ServiceNameConstants;
import com.x.provider.api.general.model.dto.gift.GiftCategoryDTO;
import com.x.provider.api.general.model.dto.gift.GiftRewardReqDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(contextId = "giftService", value = ServiceNameConstants.SERVICE)
public interface GiftRpcService {

    @PostMapping(ServiceNameConstants.RPC_URL_PREFIX_GIFT + "/reward")
    R<Void> giftReward(@RequestBody GiftRewardReqDTO giftRewardRequestDTO);

    @PostMapping(ServiceNameConstants.RPC_URL_PREFIX_GIFT + "/category/list")
    R<List<GiftCategoryDTO>> listGiftCategory();
}
